#ifndef PROBLEM_HPP_
#define PROBLEM_HPP_

#include "ipopt.hpp"
#include <iostream>

using namespace Ipopt;
using namespace std;

class Problem: public TNLP {
public:
	Problem(Index dimension) :
		dimension(dimension) {
	}

	virtual bool get_blocks_indexes(Index n, Index m, Index procCount,
			Index* procStartIndex) = 0;

	void finalize_solution(SolverReturn status, Index n, const Number* x,
			const Number* z_L, const Number* z_U, Index m, const Number* g,
			const Number* lambda, Number obj_value IPOPT8_FINARGS);

protected:
	Index dimension;

private:
	Problem();
	Problem(const Problem&);
};

typedef Problem& ProblemRef;

#endif /* PROBLEM_HPP_ */
